package edu.fudan.common.config;

import java.util.HashMap;
import java.util.Map;

public class ServiceURL {

    public static Map<String,String> servicePort = new HashMap<String, String>(){
        {
            put("ts-contacts-service", "12347");
            put("ts-admin-user-service", "16115");
            put("ts-notification-service", "17853");
            put("ts-cancel-service", "18885");
            put("ts-config-service", "15679");
            put("ts-assurance-service", "18888");
            put("ts-order-other-service", "12032");
            put("ts-route-service", "11178");
            put("ts-price-service", "16579");
            put("ts-preserve-service", "14568");
            put("ts-security-service", "11188");
            put("ts-consign-service", "16111");
            put("ts-train-service", "14567");
            put("ts-order-service", "12031");
            put("ts-verification-code-service", "15678");
            put("ts-food-service", "18856");
            put("ts-station-food-service", "18855");
            put("ts-rebook-service", "18886");
            put("ts-train-food-service", "19999");
            put("ts-admin-basic-info-service", "18767");
            put("ts-food-delivery-service", "18957");
            put("ts-consign-price-service", "16110");
            put("ts-wait-order-service", "17525");
            put("ts-basic-service", "15680");
            put("ts-preserve-other-service", "14569");
            put("ts-station-service", "12345");
            put("ts-auth-service", "12340");
            put("ts-user-service", "12342");
            put("ts-route-plan-service", "14578");
            put("ts-gateway-service", "18888");
            put("ts-payment-service", "19001");
            put("ts-inside-payment-service", "18673");
            put("ts-delivery-service", "18808");
            put("ts-seat-service", "18898");
            put("ts-execute-service", "12386");
            put("ts-travel-plan-service", "14322");
            put("ts-travel2-service", "16346");
            put("ts-travel-service", "12346");
            put("ts-admin-order-service", "16112");
            put("ts-admin-travel-service", "16114");
            put("ts-admin-route-service", "16113");
        }
    };

    public static String GetServiceURL(String serviceName) {
        return "http://"+serviceName + ":" + servicePort.getOrDefault(serviceName, "8080");
    }
}


